import request from './request'

//获取购物车内容
export function shopcartGoods(query) {
    return request({
      url: ' http://localhost:3000/douban/api/v3/shopcart',
      method: 'get',
      params: query
    })
}

//获取商品细节
/**
 * 
 * @param {json} query  {bookId:'1234'}
 */
export function getBookDetail(query) {
  return request({
    url: 'http://localhost:3000/douban/api/v3/goodsDetail',
    method: 'get',
    params: query
  })
}

//加入购物车
/**
 * 
 * @param {json} query {productList}
 */
export function addShopcart(query) {
  return request({
    url: 'http://localhost:3000/douban/api/v3/addShopcar',
    method: 'post',
    dara: query
  })
}